package com.itheima.common.es.feign;

import com.itheima.common.es.domain.Goods;
import com.itheima.common.response.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.IOException;
import java.util.List;

/**
 *
 * 定义feign的接口
 * @author liqp
 * @version 1.0
 * @date 2021/2/3
 */
@FeignClient("book-es")
public interface EsBookFeign {

    @GetMapping("/es")
    public ResponseResult<List<Goods>> search(@RequestParam(value = "from", defaultValue = "0") Integer from,
                                              @RequestParam(value = "size", defaultValue = "100") Integer size) throws IOException;
}
